var assert = require('assert');
var should = require('should');
var util = require('util');
var zlib = require('zlib');
var _ = require('lodash');
var dataApi = require('../../app/libs/dataApi');
var equipConf = require('../../app/config/equipConf');

suite('测试equipment_lvl', function () {
    suite('测试强化概率', function () {
        test('获取配置', function () {
            this.timeout(1000000);
            var total_num = 0;
            var temp = {};
            for (var i = 0; i < 1000; i++) {
                var lv = 0;
                while (lv < 8) {
                    var equip_lv_conf = equipConf.getEquipStrengthenLvConf(lv + 1);
                    if (_.random(0, 100) <= equip_lv_conf.success_rate) {
                        temp[lv] = temp[lv] || 0;
                        temp[lv]++;
                        lv++;
                        total_num++;
                    } else {
                        lv--;
                    }
                }
            };
        });
    });
});
